************
Installation
************

.. highlight:: none


LICENSE
=======

SieveManager is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SieveManager is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the :doc:`GNU General Public
License <licence>` for more details.


REQUIREMENTS
============

* A Unix-like operating system (e.g., BSD, illumos, Linux, or macOS).

* Python_ v3.9 or later.

* When installing from the tarball_,
  the `Package Installer for Python`_ (:command:`pip`)


DEBIAN PACKAGE
==============

The SieveManager Debian package should work on Debian v11 ("bullseye") or
later and any system based on Debian v11 or later (e.g., recent releases
of antiX, Devuan, elementary OS, Linux lite, Linux Mint, KDE Neon,
MX Linux, Pop!_OS, Ubuntu, Vanilla OS, and Zorin).

Add the GnuPG_ key that I use for my repository::

    sudo curl -o /etc/apt/trusted.gpg.d/org_codeberg_odkr.asc \
        https://codeberg.org/api/packages/odkr/debian/repository.key

Add my Debian repository::

    sudo tee /etc/apt/sources.list.d/org_codeberg_odkr.list <<EOF
    deb https://codeberg.org/api/packages/odkr/debian bullseye main
    EOF

Update APT_'s sources::

    sudo apt-get update

Install SieveManager::

    sudo apt-get install sievemgr


TARBALL
=======

Verification
------------

Import my `PGP key`_, so that you can check whether the tarball
has been tampered with::

    gpg --recv-key 8975B184615BC48CFA4549056B06A2E03BE31BE9

This need, and should, only be done once.


Download
--------

Download the most recent release::

    curl -O https://codeberg.org/odkr/sievemgr/releases/download/v0.7.4.1/sievemgr-0.7.4.1.tgz

Check whether the tarball has been tampered with::

    curl -O https://codeberg.org/odkr/sievemgr/releases/download/v0.7.4.1/sievemgr-0.7.4.1.tgz.asc
    gpg --verify sievemgr-0.7.4.1.tgz.asc

Unpack the tarball::

    tar -xzf sievemgr-0.7.4.1.tgz

Go to the top-level directory of the repository::

    cd sievemgr-0.7.4.1

.. TIP::
   Subscribe to https://codeberg.org/odkr/sievemgr/releases.rss
   to be notified about new releases.


.. include:: ../INSTALL.rst


EXTRAS
======

Bash completion
---------------

The :download:`Bash completion script <../comp/sievemgr.bash>`
should work automatically if bash-completion_ is installed.

However, it can also be loaded by adding, for example,

.. code:: bash

    source "$HOME/.local/share/bash-completion/completions/sievemgr.bash"

to your :file:`.bashrc`.


Zsh completion
--------------

The :download:`Zsh completion script <../comp/sievemgr.zsh>`
targets Zsh's `modern completion system <Zsh completion_>`_.

It can be activated by adding, for example,

.. code:: zsh

    fpath+=("$HOME/.local/share/zsh-completions")

    autoload -Uz compinit
    compinit

to your :file:`.zshrc`.

